package com.lzh.demo.MultipleScheDuled;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Author: LiuZiHao
 * @Date: 2022/10/26 13:48
 */
@Component
public class Task1 {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Scheduled(cron = "0/10 * * * * ? ")
    public void execute() throws InterruptedException {
        logger.info("[execute][task1]执行中...");
//        Thread.sleep(1000 * 60);
        logger.info("[execute][task1]完毕...");
    }

}
